home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Magazine / Morphos / GCC / ppc-amigaos / include / clib / netlib_protos.h < prev    next >
C/C++ Source or Header  |  2000-02-28  |  5KB  |  235 lines

  1. #ifndef CLIB_NETLIB_PROTOS_H
  2. #define CLIB_NETLIB_PROTOS_H \
  3.        "$Id: netlib_protos.h,v 4.4 1996/02/16 16:19:31 too Exp $"
  4. /*
  5.  *      Prototypes for netlib utility functions
  6.  *
  7.  *      Copyright © 1994 AmiTCP/IP Group,
  8.  *                       Network Solutions Development, Inc.
  9.  *                       All rights reserved.
  10.  */
  11.  
  12. #ifndef EXEC_TYPES_H
  13. #include <exec/types.h>
  14. #endif
  15. #ifndef SYS_TYPES_H
  16. #include <sys/types.h>
  17. #endif
  18. #ifndef SYS_CDEFS_H
  19. #include <sys/cdefs.h>
  20. #endif
  21. #ifndef EXEC_LIBRARIES_H
  22. struct Library;
  23. #endif
  24. #ifndef SYS_TIME_H
  25. #include <sys/time.h>
  26. #endif
  27. #ifndef SYS_SOCKET_H
  28. #include <sys/socket.h>
  29. #endif
  30. #ifndef NETDB_H
  31. struct hostent;
  32. struct netent;
  33. struct servent;
  34. struct protoent;
  35. #endif
  36. #ifndef NETINET_IN_H
  37. #include <netinet/in.h>
  38. #endif
  39. #ifndef DOS_DOS_H
  40. #include <dos/dos.h>
  41. #endif
  42. #ifndef DOS_RDARGS_H
  43. #include <dos/rdargs.h>
  44. #endif
  45. #ifndef SYS_STAT_H
  46. #include <sys/stat.h>
  47. #endif
  48.  
  49. #ifndef _STDARG_H
  50. #include <stdarg.h>
  51. #endif
  52.  
  53. #if !__SASC
  54. #define __stdargs
  55. #endif
  56.  
  57. /* access.c */
  58. int __access(const char *name, int mode);
  59.  
  60. /* autoinit.c */
  61. extern int h_errno;
  62. extern struct Library *SocketBase;
  63. LONG __stdargs _STI_200_openSockets(void);
  64. void __stdargs _STD_200_closeSockets(void);
  65.  
  66. /* chmod.c */
  67. int chmod(const char *path, int mode);
  68.  
  69. /* chown.c */
  70. int chown(const char *name, uid_t uid, gid_t gid);
  71.  
  72. /* dosio_init.c */
  73. extern BPTR __dosio_files[3];
  74. long __stdargs _STI_500_dosio_init(void);
  75.  
  76. /* dosio_sprintf.c */
  77. ULONG VCSPrintf(struct CSource *, const char *, va_list);
  78. ULONG CSPrintf(struct CSource *, const char *, ...);
  79. ULONG VSPrintf(STRPTR, const char *, va_list);
  80. ULONG SPrintf(STRPTR, const char *, ...);
  81.  
  82. /* dummy.c */
  83. struct hostent  *gethostent(void);
  84. struct netent  *getnetent(void);
  85. struct servent  *getservent(void);
  86. struct protoent *getprotoent(void);
  87.  
  88. /* fhopen.c */
  89. int fhopen(long file, int mode);
  90.  
  91. /* getopt.c */
  92. extern int opterr;
  93. extern int optind;
  94. extern int optopt;
  95. extern char *optarg;
  96. int   getopt(int argc, char * const argv[], char const *opts);
  97.  
  98. /* getpid.c */
  99. pid_t getpid(void);
  100.  
  101. /* gettimeofday.c */
  102. int   gettimeofday(struct timeval *tp, struct timezone *tzp);
  103.  
  104. /* herror.c */
  105. void  herror(const char *banner);
  106.  
  107. /* init_inet_daemon.c */
  108. int init_inet_daemon(void);
  109.  
  110. /* init_usergroup.c */
  111. extern struct Library *UserGroupBase;
  112. LONG __stdargs _STI_200_openUserGroup(void);
  113. void __stdargs _STD_200_closeUserGroup(void);
  114.  
  115. /* ioctl.c */
  116. int ioctl(int fd, unsigned int request, char *argp);
  117.  
  118. /* iomode.c */
  119. int iomode(int fd, int mode);
  120.  
  121. /* isatty.c */
  122. int isatty(int fd);
  123.  
  124. /* lineread.c */
  125. int   lineRead(struct LineRead * rl);
  126.  
  127. /* perror.c */
  128. void  perror(const char *banner);
  129.  
  130. /* popen.c */
  131. #ifndef _STDIO_H
  132. struct __iobuf; /* typedef struct __iobuf FILE */
  133. #endif
  134. struct __iobuf *popen(const char *cmd, const char *mode);
  135. struct __iobuf *popenl(const char *arg0, ...);
  136. int pclose(struct __iobuf *fptr);
  137. void __stdargs _STD_4000_popen(void);
  138. char *mktemp(char * template);
  139.  
  140. /* printfault.c */
  141. void  PrintNetFault(LONG code, const UBYTE *banner);
  142.  
  143. /* printuserfault.c */
  144. void  PrintUserFault(LONG code, const UBYTE *banner);
  145.  
  146. /* rcmd.c */
  147. int   rcmd(char **, int, const char *, const char *, const char *, int *);
  148. int   rresvport(int *alport);
  149.  
  150. /* serveraccept.c */
  151. long serveraccept(char *pname, struct sockaddr_in *ha);
  152.  
  153. /* set_socket_stdio.c */
  154. int set_socket_stdio(int sock);
  155.  
  156. /* setegid.c */
  157. int setegid(gid_t g);
  158.  
  159. /* seteuid.c */
  160. int seteuid(uid_t u);
  161.  
  162. /* sleep.c */
  163. void sleep(unsigned int secs);
  164.  
  165. /* stat.c */
  166. int stat(const char *name, struct stat *st);
  167.  
  168. /* strerror.c */
  169. char *strerror(int code);
  170.  
  171. /* stubs.c */
  172. #if !defined(__SASC) || !defined(_OPTINLINE) /* these are inlined for SAS/C */
  173. char * inet_ntoa(struct in_addr addr);
  174. struct in_addr inet_makeaddr(int net, int host);
  175. unsigned long inet_lnaof(struct in_addr addr);
  176. unsigned long inet_netof(struct in_addr addr);
  177. int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exeptfds,
  178.        struct timeval *timeout);
  179. #endif
  180.  
  181. /* syslog.c */
  182. void  openlog(const char *ident, int logstat, int logfac);
  183. void  closelog(void);
  184. int   setlogmask(int pmask);
  185.  
  186. /* timerinit.c */
  187. extern long __local_to_GMT;
  188. extern struct Library *TimerBase; /* actually struct Device * */
  189. LONG __stdargs _STI_200_openTimer(void);
  190. void __stdargs _STD_200_closeTimer(void);
  191.  
  192. /* usleep.c */
  193. void usleep(unsigned int usecs);
  194.  
  195. /* utime.c */
  196. #ifndef UTIME_H
  197. struct utimbuf;
  198. #endif
  199. int utime(const char *name, const struct utimbuf *times);
  200.  
  201. #ifndef _IOS1_H
  202. struct UFB;
  203. #endif
  204.  
  205. /* _allocufb.c */
  206. struct UFB * __allocufb(int *fdp);
  207.  
  208. /* _chkufb.c */
  209. long __stdargs _STI_1000_install_AmiTCP_callback(void);
  210. long ASM SAVEDS fdCallback(REG(d0) int fd, REG(d1) int action);
  211. struct UFB * __chkufb(int fd);
  212.  
  213. /* _close.c */
  214. int __close(int fd);
  215.  
  216. /* _dup.c */
  217. /* _dup2.c */
  218.  
  219. /* _fstat.c */
  220. int fstat(int fd, struct stat *st);
  221.  
  222. /* _lseek.c */
  223. long __lseek(int fd, long rpos, int mode);
  224.  
  225. /* _open.c */
  226. __stdargs int __open(const char *name, int mode, ...);
  227.  
  228. /* _read.c */
  229. int __read(int fd, void *buffer, unsigned int length);
  230.  
  231. /* _write.c */
  232. int __write(int fd, const void *buffer, unsigned int length);
  233.  
  234. #endif /* !CLIB_NETLIB_PROTOS_H */
  235.